#ifndef __GAME__H__
#define __GAME__H__


#include <Ogre.h>
#include "InputManager.h"

using namespace Ogre;


class Game : InputManager, FrameListener
{

public:

	Game();
	virtual ~Game();

	void initialise();
	void loadResources();
	void go();


	// INPUT
	virtual bool keyPressed( const OIS::KeyEvent& e );
	virtual bool mouseMoved( const OIS::MouseEvent& e );
	virtual bool mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id);
	virtual bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);

	//FRAMELISTENER
	virtual bool frameStarted(const FrameEvent& evt);
	virtual bool frameEnded(const FrameEvent& evt);


private:

	void createScene();

	Ogre::Root* m_root;
	Ogre::RenderWindow* m_window;
	Ogre::SceneManager* m_sceneManager;
	Ogre::SceneNode* sceneNode;

	Ogre::Camera* m_camera;
	Ogre::Entity* head;
	Ogre::Viewport* m_viewport;


	bool m_exitRequested;

};

#endif
